<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
  </head>

  <body>
  <div>
    
    <div ng-include="headerInclude"></div>   
    <div ng-controller="Apiman.ConsumerOrgsController" class="page container" data-field="page" ng-cloak="" ng-show="pageState == 'loaded'">
      <div class="row">
        <div class="col-md-12">
          <ol class="breadcrumb" data-field="breadcrumb">
            <li><a id="bc-home" href="{{ pluginName }}/"><i class="fa fa-home fa-fw"></i><span apiman-i18n-key="home">Home</span></a></li>
            <li class="active"><i class="fa fa-search fa-fw"></i><span apiman-i18n-key="organizations">Organizations</span></li>
          </ol>
        </div>
      </div>
      <div class="row">
        <div class="col-md-12">
          <h1 class="consumer-top-header" apiman-i18n-key="find-org">Find an Organization</h1>
        </div>
        <div class="col-md-6 no-phone">
          <p class="description" apiman-i18n-key="find-org-description">Use this page to find Organizations you may wish to join.</p>
        </div>
        <div class="col-md-6">
          <form ng-submit="searchOrg(orgName)">
            <input id="apiman-search" ng-model="orgName" type="text" class="apiman-form-control form-control input-search" apiman-i18n-key="searchfor-orgs" placeholder="Enter a word or phrase to search by..."></input>
            <button id="search-btn" type="submit" class="btn btn-default btn-search" apiman-i18n-key="search" data-field="searchButton"">Search</input>
          </form>
        </div>
        <div class="col-md-12">
          <hr />
        </div>
      </div>
      
      <!-- Search results -->
      <div class="row browse-items">
        <div class="col-md-12" data-field="orgs">

          <div class="apiman-no-content container-fluid" ng-hide="orgs.length > 0">
            <div class="row">
              <div class="col-md-9">
                <p apiman-i18n-key="consumer-no-orgs-found" class="apiman-no-entities-description">No organizations found. Either no organizations matched the query or you haven't queried yet!</p>
              </div>
              <div class="col-md-3"></div>
            </div>
          </div>

          <div ng-show="orgs.length > 0">
	        <div class="count">
	          Found {{ orgs.length }} matching organizations.
	        </div>
	        <div class="item" ng-repeat="org in orgs">
	          <div class="title"><i class="fa fa-shield icon"></i><a href="{{ pluginName }}/browse/orgs/{{ org.id }}">{{ org.name }}</a></div>
	          <div class="description" title="{{ org.description }}">{{ org.description }}</div>
<!-- 	          <div class="actions"> -->
<!-- 	            <button class="btn btn-default">Request Membership</button> -->
<!-- 	          </div> -->
	          <a apiman-i18n-key="is-member-badge" ng-show="org.isMember" href="{{ pluginName }}/orgs/{{ org.id }}" class="ismember" title="You are already a member of this Organization."></a>
	        </div>
          </div>
        </div>
      </div>
      
    </div> <!-- /container -->
  </div>
  </body>
</html>
